package com.authine.cloudpivot.ext.service;

import com.alibaba.cola.dto.SingleResponse;
import com.authine.cloudpivot.ext.domain.vo.order.OrderCustomerVO;

import java.util.List;
import java.util.Map;

/**
 * 订单service
 */
public interface OrderService {
    /**
     * 客户订单提交
     *
     * @param data@return
     */
    SingleResponse submitOrder(Map<String, Object> data);

    /**
     * 客户订单提交前置条件
     *
     * @param data
     * @return
     */
    SingleResponse orderBeforCondition(Map<String, Object> data);

    /**
     * 根据消耗创建订单(订单中心-寄售消耗统计-消耗待结算明细-生成订单)
     *
     * @param idList
     * @return
     */
    SingleResponse buildVmiOrder(List<String> idList);

    /**
     * 生成订单结果，如果为虚拟供应商，添加至转采客户订单、转采客户订单商品表中
     * 普通订单-》转采订单
     *
     * @param orderCustomer
     * @return
     */
    void toTransferOrder(Map<String, Object> orderCustomer);

    /**
     * 从购物车构建订单临时对象
     */
    OrderCustomerVO buildCartOrder(List<String> cartIds) throws Exception;

    /**
     * 从购物车构建客户订单临时对象
     */
    OrderCustomerVO builderCustomerOrder(List<String> cartIds) throws Exception;

    OrderCustomerVO createOrder(OrderCustomerVO customerOrder) throws Exception;

}
